const router = require('koa-router')();
router.prefix('/user'); //路由前缀 /user/xxx访问

router.get('/', async (ctx, next) => {
	await ctx.render('user', {
		title: '个人中心'
	});
});
router.get('/changepwd', async (ctx, next) => {
	await ctx.render('user/changepwd', {
		title: '修改密码'
	});
});
router.get('/manage', async (ctx, next) => {
	await ctx.render('user/manage', {
		title: '管理列表'
	});
});

router.get('/bar', function (ctx, next) {
	ctx.body = 'this is a users/bar response'
});

module.exports = router
